<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page contentType="text/html;charset=utf-8" pageEncoding="utf-8"
	language="java"%>
<%@ include file="/jsp/platform/include/include.jsp"%>
<html>
<head>
<TITLE><c:out value="${_LOGONUSER_.MANAGETITILE}" />
</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge" />
	<%@ include file="/jsp/platform/include/header.jsp"%>

</HEAD>
<BODY>
	<DIV class="all">
		<%@ include file="/jsp/platform/include/head.jsp"%>
		<%@ include file="/jsp/platform/include/menu.jsp"%>
		<DIV class="mains">
			<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
				<TBODY>
					<TR valign="top">
						<%@ include file="/jsp/platform/include/mainLeft.jsp"%>
						<TD>
							<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
								<TBODY>
									<TR>
										<TD>
											<TABLE width="180" border="0" cellspacing="0" cellpadding="0">
												<TBODY>
													<TR>
														<TD width="7"><IMG width="7" height="36" alt=""
															src="<%=request.getContextPath()%>/images/pages_l.jpg">
														</TD>
														<TD align="center"
															background="<%=request.getContextPath()%>/images/pages_bg.jpg">
															<SPAN class="f_tit1">分享收益查询</SPAN>
														</TD>
														<TD width="7"><IMG width="7" height="36" alt=""
															src="<%=request.getContextPath()%>/images/pages_r.jpg">
														</TD>
													</TR>
												</TBODY>
											</TABLE>
										</TD>
									</TR>
								</TBODY>
								<TR>
									<TD>
										<div class="pages_con">
											<FORM name="queryForm" id="queryForm"
												action="<%=request.getContextPath()%>/manage/shareProfitLog/shareProfitList"
												method="post">
												<div class="pages_con_20">

													<DIV class="transaction_external">
														<DIV class="clearfix">
															    <SPAN class="fund-item">
															    <SPAN class="label dl_w" style="padding-left:20px;text-align:right;">代理商账户：</SPAN>
																	<INPUT name="custSysAccount" id="custSysAccount"
																	class="txtbox_cz txtbox_cz_long txtbox_cz_color input_change"
																	type="text" maxlength="30" value="${model.custSysAccount}">
																	</INPUT>
																</SPAN>
															    <SPAN class="fund-item">
																<SPAN class="label dl_w" style="padding-left:0px;text-align:right;">代理等级</SPAN>
																<select id="roleId" name="roleId">
																    <option value="">请选择</option>
																    <c:forEach var="roleModel" items="${roleList}">
																       <option value="${roleModel.roleId}">${roleModel.roleName}</option>
																    </c:forEach>
																</select>
																<SPAN class="fund-item">
																<SPAN class="label dl_w" style="padding-left:20px;text-align:right;">代理名称</SPAN>
																    <INPUT name="agentName" id="agentName"
																	class="txtbox_cz txtbox_cz_long txtbox_cz_color input_change"
																	type="text" maxlength="30" value="${model.agentName}" >
																	</INPUT>
																</SPAN>

																<SPAN class="label dl_w" style="padding-left:50px;">
																<input type="checkbox" id="isDirect" name="isDirect" value="1"
																<c:if test="${model.isDirect=='1'}">checked="true"</c:if>>直属代理</SPAN>

																<SPAN class="fund-item"> 
																<A class="btn confirm margin_l_10" onClick="$('#queryForm').submit();" href="javascript:void(0);">查询</A>
															    </SPAN>

															    <SPAN class="fund-item">
																<A class="btn confirm margin_l_10" onClick="downloadShareProfitLogList();" href="javascript:void(0);">下载</A>
															    </SPAN>
														</DIV>
													</DIV>
													<br>
													&nbsp;&nbsp;
													<span style="color:black;margin-bottom:10px;margin-left:10px;font-size:15px;">总分享收益余额：<c:out value="${sprofitBal}"/>
											        <span style="color:black;margin-bottom:10px;margin-left:10px;font-size:15px;">总可用金额：<c:out value="${sprofitAvlAmt}"/>
                                                    <br/>
														<div class="talbes">
															<table style="text-align: center" width="100%" border="0"
																cellpadding="8" cellspacing="0">
																<tbody>
																	<tr class="talbe_pubs_tr">
																	<td>更新时间</td>
																		<td>代理商账户</td>
																		<td>代理名称</td>
																		<td>代理等级</td>
																		<td>分享收益金额</td>
																		<td>可用余额</td>
																	</tr>

																	<c:forEach var="model" items="${list}">

																		<tr>
																			<td><fmt:formatDate value="${model.createDate}"
																					pattern="yyyy-MM-dd HH:mm:ss" /></td>
																			<td>${model.custSysAccount}</td>
																			<td>${model.agentName}</td>
																			<td>${model.roleName}</td>
																			<td><fmt:formatNumber pattern="#,##0.00" value="${model.sprofitBal}"/></td>
																			<td><fmt:formatNumber pattern="#,##0.00" value="${model.sprofitAvlAmt}"/></td>
																		</tr>
																	</c:forEach>

																</tbody>
															</table>
															<jsp:include page="/jsp/platform/include/kkpager.jsp"></jsp:include>
														</div>
												</div>
											</FORM>
										</div> <!--当中内容块结束-->
									</TD>
								</TR>
							</TABLE>
						</TD>
					</TR>
				</TBODY>
			</TABLE>
		</DIV>
		<%@ include file="/jsp/platform/include/foot.jsp"%>
			<script type="text/javascript">
                $("#roleId").val("<c:out value='${model.roleId}'/>");

                function downloadShareProfitLogList(){
                    $("#queryForm").attr("action","<%=request.getContextPath()%>/manage/shareProfitLog/downLoadProfitList");
                    $('#queryForm').submit();
                    $("#queryForm").attr("action","<%=request.getContextPath()%>/manage/shareProfitLog/shareProfitList");
                }
			</script>
</BODY>
</HTML>
